home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Memo
- ; use this source as you like
- ; written by Philipp Lonke
- ; simplified by Daniel Pink
- ;
-
- ; Executeable now 4736 bytes long when compiled without
- ; debug. Most size savings by not using Null(), and not
- ; using NPrint.
- NoCli
-
- INCLUDE "blitz2:bbincludes/libraries/triton.bb2"
-
- ; NOTE no need to store parameters in array as Blitz
- ; keeps them anyway, though its worth exiting
- ; immediately if the wrong number of parameters
- ; have been passed.
- If NumPars<>2 Then End
-
-
- InitTagList 0,10
- Use TagList 0
-
-
- ; Uses ? and Dc.b for strings if set to 1
- #WithDCs=1
-
- CNIF #WithDCs=1
-
- ; Note use of ?, strings defined at bottom
- AddTags #TRCA_Name,?name
- AddTags #TRCA_LongName,?longname
- AddTags #TRCA_Version,?version
- AddTags #TAG_END,0
-
- CELSE
-
- ; NOTE you could also do something like
- name$="memo"
- longname$="memo - the informer"
- version$="1.0"
- AddTags #TRCA_Name,&name$
- AddTags #TRCA_LongName,&longname$
- AddTags #TRCA_Version,&version$
- AddTags #TAG_END,0
- ;
- ; BUT name$,longname$,version$ must NOT be changed until they
- ; have been used by Triton, which in this case is after TR_CreateApp_
- ; is called.
-
- CEND
-
-
-
- ; NOTE type now .l It probably doesn't make any difference, but
- ; there's no need to bother with a pointer to a NEWTYPE if
- ; none of the NEWTYPE fields need to be accessed.
- application.l=TR_CreateApp_(TagList)
-
- If application
-
- ; NOTE par$() used directly
- body$="%b"+Par$(1) ; Bold text
- body$+Chr$(9) ; Add a tab char for a 3d separator line
- body$+"%3"+Par$(2) ; 3d text
-
- ; NOTE use of &body$, and that TR_EasyRequest has been used as
- ; a statement as the result is not going to be used anyway.
- TR_EasyRequest_ application,&body$,?gads,?reqtags
-
- ; NOTE used as statement again
- TR_GetMsg_ application
-
- TR_DeleteApp_ application
-
- ; NOTE removed NPrint becasue I didn't thing it was worth doubling
- ; the executeable size for!!
- EndIf
-
- End
-
- CNIF #WithDCs=1
-
- name:
- Dc.b "Memo",0
- longname:
- Dc.b "Memo - the informer",0
- version:
- Dc.b "1.0",0
-
- CEND
-
- reqtags:
- Dc.l 0,0
- gads:
- Dc.b "_OK",0
- Even
-
-